<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>外边距合并</title>
    <style>
        *{
            margin: 0px;
            padding: 0px;
        }
        .c1{
            width: 200px;
            height: 100px;
            background-color: red;
            margin-bottom: 50px;
        }
        .c2{
            width: 200px;
            height: 100px;
            background-color: green;
            margin-top: 100px;
        }
    </style>
</head>
<body>
<div class="c1"></div>
<div class="c2"></div>

</body>
</html>